﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace Vibz.Game.Bugs.Model
{
    [Serializable]
    [XmlType(TypeName = "c")]
    public class Coin : GroundObject
    {
        int _value;
        [XmlElement("v")]
        public int Value { get { return _value; } set { _value = value; NotifyValueChanged("Value", value); } }

        public Coin() { }
        public Coin(Ground gnd, int value) : base(gnd)
        {
            Value = value;
        }
        public override void MergeOnPlayer(Player player)
        {
            player.Accelerate();
            player.Score += Value;
        }
    }
}
